<template>
  <div id="app">
    <Hello :data="msg"></Hello>
    <div>app</div>
    <movie v-for="item of movies" :key="item.title" :item="item"></movie>
  </div>
</template>

<script>
import Hello from '../components/Hello.vue'
import Movie from '../components/Movie.vue'
import axios from 'axios'
export default {
  name: 'App',
  data(){
    return {
      msg:"good",
      movies:[]
    }
  },
  components:{
    Hello,
    Movie
  },
  mounted(){
    axios.get('http://localhost:8000/top250').then(res=>{
      this.movies = res.data.result
    })
  }
}
</script>

<style>

</style>
